using System.ComponentModel;
using System.ComponentModel.Design.Serialization;
using System.Windows.Forms;

namespace Microsoft.WowAddonStudio.FrameXml.Services
{
	/// <summary>
	/// Provides a service that can generate unique names for FrameXmlControl objects.
	/// </summary>
	public interface IFrameXmlNameCreationService : INameCreationService
	{
		/// <summary>
		/// Creates a new name that is unique to all components in the specified container.
		/// </summary>
		/// <param name="container">The container where the new object is added.</param>
		/// <param name="prefixName">Name of the prefix.</param>
		/// <returns>A unique name for the data type.</returns>
		string CreateName(IContainer container, string prefixName);
        
		/// <summary>
		/// Gets a value indicating whether the specified name is valid.
		/// </summary>
		/// <param name="control">The control.</param>
		/// <param name="layoutFrameName">Name of the layout frame.</param>
		/// <returns>
		/// true if the name is valid; otherwise, false.
		/// </returns>
		bool HasValidName(Control control, string layoutFrameName);

        /// <summary>
        /// Determines whether [has valid name] [the specified component].
        /// </summary>
        /// <param name="component">The component.</param>
        /// <param name="componentName">Name of the component.</param>
        /// <returns>
        /// 	<c>true</c> if [has valid name] [the specified component]; otherwise, <c>false</c>.
        /// </returns>
	    bool HasValidName(Component component, string componentName);
	}
}